Skip to content

Use v6 Should-* syntax in docs examples - #415

Merged
nohwnd merged 1 commit into
mainfrom
nohwnd-update-should-syntax-examples
Aug 7, 2026
Merged

Use v6 Should-* syntax in docs examples#415
nohwnd merged 1 commit into
mainfrom
nohwnd-update-should-syntax-examples

Conversation

@nohwnd

@nohwnd nohwnd commented Jul 15, 2026

Copy link
Copy Markdown
Member

The getting started page and the usage docs still teach the classic Should -Be syntax. v6 recommends the new Should-* assertions, so the canonical examples should use them.

This converts the examples in quick-start and docs/usage/*. Pages that document the old syntax on purpose are left as they are: the classic, soft and custom assertion references, the migration guides, and the generated command reference under docs/commands.

A few conversions are not a plain rename:

  • Should -Contain becomes Should-ContainCollection (membership in a collection).
  • Should -InvokeVerifiable becomes Should-Invoke -Verifiable, and the Should -Invoke headings in mocking.mdx lose the space. The inbound anchor in breaking-changes-in-v5 is updated to match.
  • The failure output in quick-start now prints types, so Expected 8, but got 9. becomes Expected [int] 8, but got [int] 9., matching what v6 actually prints.

Verified the converted examples and the mappings against Pester 6.0.0.

The getting started page and usage docs taught the classic `Should -Be`
syntax. v6 recommends the new `Should-*` assertions, so convert the canonical
examples to them.

Pages that document the old syntax on purpose are left unchanged: the classic,
soft and custom assertion references, the migration guides, and the generated
command reference.

Some conversions are not a plain rename:
- `Should -Contain` -> `Should-ContainCollection`
- `Should -InvokeVerifiable` -> `Should-Invoke -Verifiable`, and the
  `Should -Invoke` headings lose the space (the inbound anchor in
  breaking-changes-in-v5 is updated to match)
- quick-start failure output now shows types, e.g. `Expected 8, but got 9.` ->
  `Expected [int] 8, but got [int] 9.`, to match what v6 prints

Verified the converted examples against Pester 6.0.0.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@fflaten fflaten left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢

@nohwnd
nohwnd merged commit dd6fb3f into main Aug 7, 2026
4 checks passed
@nohwnd
nohwnd deleted the nohwnd-update-should-syntax-examples branch August 7, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants